]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
location: disconnect from 'g-properties-changed' signal
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Mon, 17 Feb 2014 01:17:46 +0000 (01:17 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Mon, 17 Feb 2014 12:08:40 +0000 (12:08 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=723684

js/ui/status/location.js

index 6cf94eed390e95ce821780375f5c181e63c336f1..d7243c13c286314f6b552a76edef2539a739f1e0 100644 (file)
@@ -119,7 +119,8 @@ const Indicator = new Lang.Class({
         }
 
         this._proxy = proxy;
-        this._proxy.connect('g-properties-changed', Lang.bind(this, this._onGeocluePropsChanged));
+        this._propertiesChangedId = this._proxy.connect('g-properties-changed',
+                                                        Lang.bind(this, this._onGeocluePropsChanged));
 
         this._updateMenuVisibility();
         this._syncIndicator();
@@ -136,6 +137,10 @@ const Indicator = new Lang.Class({
     },
 
     _onGeoclueVanished: function() {
+        if (this._propertiesChangedId) {
+            this._proxy.disconnect(this._propertiesChangedId);
+            this._propertiesChangedId = 0;
+        }
         this._proxy = null;
 
         this._syncIndicator();